package nafos.server.request

import org.springframework.web.context.request.RequestContextHolder
import org.springframework.web.context.request.ServletRequestAttributes
import javax.servlet.http.HttpServletRequest


typealias NsRequest = HttpServletRequest

inline fun currentRequest(): NsRequest? {
    val servletRequestAttributes = RequestContextHolder.getRequestAttributes() as? ServletRequestAttributes
    return servletRequestAttributes?.request
}